package com.zhuliwei.actuator;

import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * 自定义端点
 *
 * @author 朱力维
 * @time 2022/10/23 17:34
 **/
@Component
@Endpoint(id = "pay",enableByDefault = true)
public class PayEndpoint {
    // 读取端点
    @ReadOperation
    public Object getPay(){
        Map payMap = new HashMap();
        payMap.put("level 1","300");
        payMap.put("level 2","600");
        payMap.put("level 3","900");
        return payMap;
    }
}
